<? include("include/session.php"); ?>
<? 
    	$page="bestellen2.php";
		mysql_connect ('localhost', 'deb46160', 'd3e01tGF') or die ('Error: ' .mysql_error());
		mysql_select_db ("deb46160_PizzaRio");
		$stamp = strtotime("now");
		$orderid = $stamp-$REMOTE_ADDR;
		$orderid = str_replace(".","", $orderid);
		$_SESSION['orderid']=$orderid;
		date_default_timezone_set("Europe/Amsterdam");
		$user=$_SESSION['username'];
		$query="INSERT INTO `Order`(`ordernr`, `userid`, `datum`) VALUES (".$orderid.",'".$user."',CURDATE())";
		mysql_query($query) or die(mysql_error());
		header("Refresh: 1; URL=\"" . $page . "\"");
	?>
